﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;

namespace DAL
{
	public partial class DBSession 
    {
        public int SaveChanges(string type)
        {
            return new DBContextFactory().GetDbContext(type).SaveChanges();
        }
      
       private	IObject_DAL iObject_DAL;
		public IObject_DAL IObject_DAL
		{
			get
			{
				if(iObject_DAL==null)
					iObject_DAL= new Object_DAL();
				return iObject_DAL;
			}
			set
			{
				iObject_DAL= value;
			}
		}
    }

	public partial class DBSession:IDBSession
    {

		#region 01 数据接口 ICurrency_DAL
	    private	ICurrency_DAL iCurrency_DAL;
		public ICurrency_DAL ICurrency_DAL
		{
			get
			{
				if(iCurrency_DAL==null)
					iCurrency_DAL= new Currency_DAL();
				return iCurrency_DAL;
			}
			set
			{
				iCurrency_DAL= value;
			}
		}
		#endregion

		#region 02 数据接口 ICurrencyConvertLoss_DAL
	    private	ICurrencyConvertLoss_DAL iCurrencyConvertLoss_DAL;
		public ICurrencyConvertLoss_DAL ICurrencyConvertLoss_DAL
		{
			get
			{
				if(iCurrencyConvertLoss_DAL==null)
					iCurrencyConvertLoss_DAL= new CurrencyConvertLoss_DAL();
				return iCurrencyConvertLoss_DAL;
			}
			set
			{
				iCurrencyConvertLoss_DAL= value;
			}
		}
		#endregion

		#region 03 数据接口 IRateOfExchange_DAL
	    private	IRateOfExchange_DAL iRateOfExchange_DAL;
		public IRateOfExchange_DAL IRateOfExchange_DAL
		{
			get
			{
				if(iRateOfExchange_DAL==null)
					iRateOfExchange_DAL= new RateOfExchange_DAL();
				return iRateOfExchange_DAL;
			}
			set
			{
				iRateOfExchange_DAL= value;
			}
		}
		#endregion

		#region 04 数据接口 IRateOfExchangeAnalysi_DAL
	    private	IRateOfExchangeAnalysi_DAL iRateOfExchangeAnalysi_DAL;
		public IRateOfExchangeAnalysi_DAL IRateOfExchangeAnalysi_DAL
		{
			get
			{
				if(iRateOfExchangeAnalysi_DAL==null)
					iRateOfExchangeAnalysi_DAL= new RateOfExchangeAnalysi_DAL();
				return iRateOfExchangeAnalysi_DAL;
			}
			set
			{
				iRateOfExchangeAnalysi_DAL= value;
			}
		}
		#endregion

		#region 05 数据接口 IRateOfExchangeHistory_DAL
	    private	IRateOfExchangeHistory_DAL iRateOfExchangeHistory_DAL;
		public IRateOfExchangeHistory_DAL IRateOfExchangeHistory_DAL
		{
			get
			{
				if(iRateOfExchangeHistory_DAL==null)
					iRateOfExchangeHistory_DAL= new RateOfExchangeHistory_DAL();
				return iRateOfExchangeHistory_DAL;
			}
			set
			{
				iRateOfExchangeHistory_DAL= value;
			}
		}
		#endregion

		#region 06 数据接口 ISalesPlatformSiteInfoAccess_DAL
	    private	ISalesPlatformSiteInfoAccess_DAL iSalesPlatformSiteInfoAccess_DAL;
		public ISalesPlatformSiteInfoAccess_DAL ISalesPlatformSiteInfoAccess_DAL
		{
			get
			{
				if(iSalesPlatformSiteInfoAccess_DAL==null)
					iSalesPlatformSiteInfoAccess_DAL= new SalesPlatformSiteInfoAccess_DAL();
				return iSalesPlatformSiteInfoAccess_DAL;
			}
			set
			{
				iSalesPlatformSiteInfoAccess_DAL= value;
			}
		}
		#endregion

    }

}